﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        function ValidateHopThu() {
            var hoten = document.getElementsByName("HopThu_HoTen").item(0);
            if (hoten.value == "") {
                alert("Please input HoTen");
                return false;
            }
            var emailnguoihoi = document.getElementsByName("HopThu_Email").item(0);
            if (emailnguoihoi.value == "") {
                alert("Please input Email");
                return false;
            }
	        var tieude = document.getElementsByName("HopThu_TieuDe").item(0);
	        if (tieude.value == "") {
		        alert("Please input TieuDe");
		        return false;
	        }
	        var noidung = document.getElementsByName("HopThu_NoiDung").item(0);
	        if (noidung.value == "") {
		        alert("Please input NoiDung");
		        return false;
	        }
	        return true;
        }
        <% if (ViewData["HoiDap"] != null){ %>
		    alert('<%= ViewData["HoiDap"] %>');
	    <% } %>
    </script>
    <div class="cate_area">
        <div class="bg_nav">
            <a href="<%= Url.Action("Index", "Home") %>">Trang chủ</a> » Yêu cầu tìm sách
        </div>
        <div class="bg_760">
            <h4>
                Yêu cầu tìm sách</h4>
        </div>
        <div class="clear">
        </div>
        <div class="bg_760_center" style="padding: 10px; width: 738px">
            <% using (Html.BeginForm("InsertHopThu", "Home", FormMethod.Post, new { onsubmit = "return ValidateHopThu();" }))
               { %>
            <table align="center" width="98%" cellpadding="3" cellspacing="3" border="0" style="text-transform: none;
                font-size: 13px;">
                <tbody>
                    <tr>
                        <td colspan="2" style="color: #FF0000; font-weight: bold; text-align: left">
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="text-align: left;">
                            Tên đầy đủ:
                        </td>
                        <td align="left" style="text-align: left">
                            <input type="text" style="width: 200px" name="HopThu_HoTen" class="contact_text"
                                value="" />
                            <span style="color: #CC3300">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="text-align: left">
                            Email:
                        </td>
                        <td align="left" style="text-align: left">
                            <input type="text" name="HopThu_Email" style="width: 200px" class="contact_text"
                                value="" />
                            <span style="color: #CC3300">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="text-align: left">
                            Tiêu đề:
                        </td>
                        <td align="left" style="text-align: left">
                            <input type="text" style="width: 200px" name="HopThu_TieuDe" class="contact_text"
                                value="" />
                            <span style="color: #CC3300">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" style="text-align: left">
                            Nội dung:
                        </td>
                        <td align="left" style="text-align: left">
                            <textarea name="HopThu_NoiDung" class="contact_text" style="height: 100px; width: 500px;
                                font-family: Arial; font-size: 12px"></textarea>
                            <span style="color: #CC3300">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            &nbsp;
                        </td>
                        <td align="left" style="text-align: left">
                            <input type="submit" name="sbt" id="sbt" value="Gửi thư" style="background-image: url(../../../Content/Images/Home/bgbutton.jpg);
                                color: #FFFFFF; font-size: 16px; font-weight: bold; border: 1px #DBDBDB solid;
                                height: 30px; cursor: pointer;" />
                        </td>
                    </tr>
                </tbody>
            </table>
            <% } %>
        </div>
        <div class="clear">
        </div>
        <div class="bg_760_bt">
        </div>
    </div>
</asp:Content>
